home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
asm
/
misc
/
execports
/
execports.readme
next >
Wrap
Text File
|
1980-01-03
|
2KB
|
34 lines
ReadMe file about Exec ports.
This little archive contains two sources (and exectuables): WaitPort.s and
PutMsg.s. I hope they'll help you to understand ports communication in Exec
library. Before running WaitPort, open two consoles (CLI or Shell). In one of
them run WaitPort. Well, nothing interesting will happen, but prompt will not
return, and it'll be looking, like WaitPort is still running. Then in other
console run PutMsg program. You can also put some text as parameter, e.g.:
1> PutMsg It's some stupid text...
and press <Return>. Now look, what will happend in the first console - the text
you have just typed, shows in the another window! After this prompt will return
in both consoles, and you can use them for anything else (e.g. closing... 8).
The question is - what does it have in common with exec ports? Here's an
explanation.
First source (WaitPort.s) creates new port called "Amsterdam" and adds it to
the system public ports list. Then it waits for message(s) that will come to
this port. And if you run now PutMsg, it will look for public port called
exactly "Amsterdam". If it find it, then a message will be send to that port.
The message contains ID header (it's string "CRMX", but it can be anything
else), length of parameter string (it's 1 (one) if there's no parameters; this
"one" is for CR code $0a), and pointer to parameter string. WaitPort will
receive the message, reads the parameter, writes it on the console and send
reply message to PutMsg task. After this, both programs will quit. Now, take a
look at the sources, to make everything clear. In case of any problems, you can
write to me (I prefer EMail).
- Cromax
EMail: kita@sun10.ci.pwr.wroc.pl
(c) 1994 by Tomislaw "Cromax" Kitynski